<template>
    <div>
        <h1>测试销毁阶段的生命周期组件 MyProp</h1>
        传值:{{ init }}
    </div>
</template>

<script>
    export default {
        name:"MyProp",
        props:{
            init:0
        },
        data() {
            return {
                message: 'Hello, World!https://gitee.com/shizi-tong/dl2420-vuevue.git'
            };
        },
        beforeCreate() {
            console.log('Before the instance is initialized.');
        },
        created() {
            console.log('The instance has been initialized but not yet mounted to the DOM.');
        },
        beforeMount() {
            console.log('Before the instance and its children are inserted into the DOM.');
        },
        mounted() {
            console.log('The instance has been mounted to the DOM - now you can see it in the browser!');
        },
        beforeUpdate() {
            console.log('Before updating the DOM - triggered by reactive data changes.');
        },
        updated() {
            console.log('After updating the DOM - triggered by reactive data changes.');
        },
        beforeDestroy() {
            console.log('Before destroying the instance - all hooks have been called up to this point.');
        },
        destroyed() {
            console.log('The instance has been destroyed - all DOM listeners/event handlers have been removed.');
        }
    };
</script>